package com.ksd.pug.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.*;

import java.util.Date;

/**
 * @author hcl
 * @date 2022/3/21$ 22:00$
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
@TableName("yp_article_comment")
public class ArticleComment implements java.io.Serializable {

    //	主健
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    //评论内容
    private String content;
    //评论用户id
    private Long userid;
    //评论用户昵称
    private String usernickname;
    //评论用户头像
    private String useravatar;
    //	回复用户id
    private Long replyUserid;
    //回复用户昵称
    private String replyUsernickname;
    //回复用户头像
    private String replyUseravatar;
    //	评论的层级0第一级 1第二级
    private Long parentId;
    //	文章id
    private Long articleId;
    //	点赞数
    private Integer zannum;
    /** 删除 */
    private Integer isdelete ;
    /** 发布状态 */
    private Integer status ;
    /**
     * 创建时间 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    //	用户是否点赞 1点赞过 0未点赞
    @TableField(exist = false)
    private Integer iszan = 0;
    /**
     * 二级评论
     */
    /*定义装载的子集*/
    @TableField(exist = false)
    private Page<ArticleComment> pageChildrens;
    //子集数
    @TableField(exist = false)
    private Long childrenNums;

    @TableField(exist = false)
    private Integer cpageNo=1;

    @TableField(exist = false)
    private Integer cpageSize=3;

    @TableField(exist = false)
    private Integer ctotal=0;

    @TableField(exist = false)
    private Integer cpages=0;

    @TableField(exist = false)
    private boolean pinglunshow = false;

    @TableField(exist = false)
    private String pinglun = "";
}
